package com.njust.dataobject;

import lombok.ToString;

import java.util.Date;


@ToString
public class User {
    private Long id;

    private String name;

    private String password;

    private String username;

    //用户的状态
    private Integer userstate=0;

    //用户的角色
    private Integer userrole=0;

    private Date createtime;

    private Date updatetime;

    public User(Long id, String name, String password, String username, Integer userstate, Integer userrole, Date createtime, Date updatetime) {
        this.id = id;
        this.name = name;
        this.password = password;
        this.username = username;
        this.userstate = userstate;
        this.userrole = userrole;
        this.createtime = createtime;
        this.updatetime = updatetime;
    }

    public User() {
        super();
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name == null ? null : name.trim();
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password == null ? null : password.trim();
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username == null ? null : username.trim();
    }

    public Integer getUserstate() {
        return userstate;
    }

    public void setUserstate(Integer userstate) {
        this.userstate = userstate;
    }

    public Integer getUserrole() {
        return userrole;
    }

    public void setUserrole(Integer userrole) {
        this.userrole = userrole;
    }

    public Date getCreatetime() {
        return createtime;
    }

    public void setCreatetime(Date createtime) {
        this.createtime = createtime;
    }

    public Date getUpdatetime() {
        return updatetime;
    }

    public void setUpdatetime(Date updatetime) {
        this.updatetime = updatetime;
    }
}